The emperor, [I 005 / Qin Shi Huang], had a three-stage plan to unify China. In 238BC he took power in the state of Qin. From 230-221BC he vanquished all his enemies and enlarged China's borders east to the pass of Shanhaiguan, north to the [G 22 / steppe] and the Xiongnu tribe's territory and south to the sea. From 221BC to his death in 210BC, he reorganized his empire, creating roads, standardizing weights and measures, and implementing a new moral order. He also destroyed all the walls separating the states and built a great wall along the northern frontier. This was to protect his empire against invasions by [G 14 / nomadic] tribes. Qin's massive projects, including his Great Wall, depleted the empire's resources and rebellion erupted. In 206BC Qin's son, who had taken over when his father died in 210BC, was overthrown.